package www.cskaoyan.com.bean;

import java.util.HashMap;

public class Group {

    private Integer id;
    private String groupName;
    private Integer classId;
    private String className;

    public Group() {
    }
    public Group(HashMap parameters) {
        if (parameters == null){
            return;
        }else {
            try {
                // parameters={classId=5, groupName=没有bug}
                if (parameters.containsKey("classId")){
                    classId = Integer.parseInt((String) parameters.get("classId"));
                }
                if (parameters.containsKey("groupName")){
                    groupName = (String) parameters.get("groupName");
                }
                if (parameters.containsKey("id")){
                    id = Integer.parseInt((String) parameters.get("id"));
                }
            }catch (Exception e){
                System.out.println("前端传递参数转化异常: 参考类型异常");
            }
        }
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }
}
